package com.scut.online_black_market.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.scut.online_black_market.dto.ErrandResponse;
import com.scut.online_black_market.dto.PostErrandInfo;
import com.scut.online_black_market.exception.PostErrandException;
import com.scut.online_black_market.exception.UniversalException;

import java.math.BigInteger;

/**
 * create by xc on 2020年11月12日 11点36分
 * ErrandService
 */
public interface ErrandService {

    /**
     * 发布代跑腿信息
     * @param postErrandInfo
     * @throws PostErrandException
     */
    void postErrand(PostErrandInfo postErrandInfo)throws PostErrandException;

    /**
     * 查询代跑腿详细信息
     * @param errandId
     * @return
     */
    ErrandResponse queryByErrandId(BigInteger errandId) throws UniversalException;

    /**
     *
     * @param pageNo
     * @param pageSize
     * @param typeId
     * @return
     */
    IPage<ErrandResponse> queryErrandByPage(short pageNo, short pageSize, short typeId);

    /**
     *
     * @param errandID
     * @param acceptorID
     */
    void accept(BigInteger errandID, String acceptorID) throws UniversalException;

}
